<?php
namespace app\apps\model;
/* *
 * 授权管理
 * */
class vip extends \app\base\model\BaseModel{
	protected $table = 'app_vip'; //设置表名
    
    //列表
    public function _select($condition = array()){
        return $this->where($condition)->order('id desc')->select();
    }

    //内容
    public function _find($condition){
        return $this->where($condition)->find();
    }

    //删除
    public function _delete($id){
        return $this->where(array('id'=>$id))->delete();
    }  

    //编辑
    public function _update($data,$condition = NULL){
        if($condition){
            return $this->where($condition)->data($data)->update();
        }else{
            return $this->data($data)->insert();
        }
    }  
}